﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using ToWaDBFirst.Models;

namespace ToWaDBFirst
{
    /// <summary>
    /// Summary description for ToWaWebService
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    [System.Web.Script.Services.ScriptService]
    public class ToWaWebService : System.Web.Services.WebService
    {
        ToWaService service = new ToWaService();

        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }

        [WebMethod]
        public List<MessageWrapper> Message(string fromDate, string toDate, string title, string content, string from)
        {
            return service.WebService(fromDate, toDate, title , content , from, User.Identity.Name);
        }
    }
}
